package org.example.observer;

import org.example.observer.improve.BaiduSite;
import org.example.observer.improve.CurrentConditions;
import org.example.observer.improve.WeatherData;

/**
 * @author wangbin
 * @date 2024/4/19
 * @vesion 1.0
 */
public class Client {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        CurrentConditions currentConditions = new CurrentConditions();
        BaiduSite baiduSite = new BaiduSite();

        currentConditions.update(55,44,55);
        baiduSite.update(14,22,65);

        weatherData.registerObserver(currentConditions);
        weatherData.registerObserver(baiduSite);
        weatherData.notifyObservers();

    }
}
